﻿/*------------------------------------------------
// File Description: ProductSiteBom DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-03-15 20:04:13
//------------------------------------------------*/

using System.Data.Entity;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 成品组件过站BOM
    /// </summary>
    [Table(nameof(ProductSiteBom))]
    public class ProductSiteBom : BaseEntity
    {
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _bomCategoryCode = string.Empty;
        private string _bomCategoryName = string.Empty;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 站点类型
        ///</Summary>
        public Enum.SiteType SiteType { get; set; }

        ///<Summary>
        /// BOM分类名称
        ///</Summary>
        public string BomCategoryCode
        {
            get { return string.IsNullOrWhiteSpace(_bomCategoryCode) ? string.Empty : _bomCategoryCode; }
            set { _bomCategoryCode = value; }
        }

        ///<Summary>
        /// BOM分类名称
        ///</Summary>
        public string BomCategoryName
        {
            get { return string.IsNullOrWhiteSpace(_bomCategoryName) ? string.Empty : _bomCategoryName; }
            set { _bomCategoryName = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 成品组件过站BOM
        /// </summary>
        public virtual DbSet<ProductSiteBom> ProductSiteBoms { get; set; }
    }
}